package com.example.recipesapp.ui.components

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.room.util.TableInfo
import coil.compose.AsyncImage
import com.example.recipesapp.data.Step
import java.io.File

@Composable
fun StepItem(step: Step) {
    Column(modifier = Modifier.padding(8.dp)) {
        Text("步骤 ${step.stepNumber}", fontWeight = FontWeight.Bold)
        AsyncImage(
            model = File(step.imagePath),
            contentDescription = "步骤图",
            modifier = Modifier
                .height(200.dp)
                .fillMaxWidth()
        )
        Text(step.description)
    }
}